load("@rules_proto_grpc//:defs.bzl", "proto_plugin")

proto_plugin(
    name = "proto_plugin",
    exclusions = [
        "google/protobuf",
    ],
    outputs = [
        "{protopath}.pb.h",
        "{protopath}.pb.cc",
    ],
    protoc_plugin_name = "cpp",
    visibility = ["//visibility:public"],
)

proto_plugin(
    name = "grpc_plugin",
    exclusions = [
        "google/protobuf",
    ],
    options = [
        "generate_mock_code=true",
    ],
    outputs = [
        "{protopath}.grpc.pb.h",
        "{protopath}.grpc.pb.cc",
        "{protopath}_mock.grpc.pb.h",
    ],
    tool = "@grpc//src/compiler:grpc_cpp_plugin",
    visibility = ["//visibility:public"],
)
